<!-- 基础表格组件 -->
<template>
  <el-table
    :ref="table"
    :border="true"
    :data="data"
    row-key="id"
    row-class-name="choose"
    height="100%"
    :row-click="rowClick"
  >
    <slot> </slot>
  </el-table>
</template>

<script setup>
import { defineProps, ref } from "vue"
const emit = defineEmits(["rowClick"])
const props = defineProps({
    data: {
        type: Array,
        default: () => [],
    },
})
const table = ref(null)
const rowClick = (row, index, e) => {
    table.value.toggleRowExpansion(row)
    emit("rowClick", row, index)
}
</script>

<style lang="scss" scoped></style>
>
